package com.happy.entity;
// default package

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Authority entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "authority", catalog = "sec", uniqueConstraints = {})
public class Authority implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -4267096376255908661L;
	private Integer id;
	private String authorityName;

	// Constructors

	/** default constructor */
	public Authority() {
	}

	/** full constructor */
	public Authority(Integer id, String authorityName) {
		this.id = id;
		this.authorityName = authorityName;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false, insertable = true, updatable = true)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "authorityName", unique = false, nullable = false, insertable = true, updatable = true, length = 20)
	public String getAuthorityName() {
		return this.authorityName;
	}

	public void setAuthorityName(String authorityName) {
		this.authorityName = authorityName;
	}

}